package com.zhentao.payment.controller;

import com.zhentao.payment.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 统计控制器
 */
@RestController
@RequestMapping("/api/statistics")
public class StatisticsController {
    
    @Autowired
    private StatisticsService statisticsService;
    
    /**
     * 获取今日统计数据
     */
    @GetMapping("/today")
    public ResponseEntity<Map<String, Object>> getTodayStatistics() {
        return ResponseEntity.ok(statisticsService.getTodayStatistics());
    }
} 